syntax = "proto2";

package tensorflow.core.function.trace_type.default_types;

import "tensorflow/core/function/trace_type/serialization.proto";

// Represents a serialized Literal type.
message SerializedLiteral {
  message NoneValue {}

  oneof value {
    bool bool_value = 1;
    int64 int_value = 2;
    double float_value = 3;  // Python "float" is double precision.
    string str_value = 4;
    NoneValue none_value = 5;
  }
}

// Represents a serialized Tuple type.
message SerializedTuple {
  repeated tensorflow.core.function.trace_type.serialization.SerializedTraceType
      components = 1;
}

// Represents a serialized List type.
message SerializedList {
  optional SerializedTuple components_tuple = 1;
}

// Represents a serialized NamedTuple type.
message SerializedNamedTuple {
  optional string type_name = 1;
  repeated string attribute_names = 2;
  optional SerializedTuple attributes = 3;
}

// Represents a serialized Attrs type.
message SerializedAttrs {
  optional SerializedNamedTuple named_attributes = 1;
}

// Represents a serialized Dict type.
message SerializedDict {
  repeated SerializedLiteral keys = 1;
  repeated tensorflow.core.function.trace_type.serialization.SerializedTraceType
      values = 2;
}
